package org.dreamwork.jasmine2.web.controls.pdf;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by IntelliJ IDEA.
 * User: seth.yang
 * Date: 2010-10-11
 * Time: 13:41:34
 */
public class DocumentInfo {
    private String name = "Document.pdf";
    private String size = "A4";
    private String margin;
    private String padding;

    private Map<MetaElementPosition, DocumentMetaElement> elements = new HashMap<MetaElementPosition, DocumentMetaElement> ();
    private List<PDFFont> fonts = new ArrayList<PDFFont> ();

    public String getName () {
        return name;
    }

    public void setName (String name) {
        this.name = name;
    }

    public String getSize () {
        return size;
    }

    public void setSize (String size) {
        this.size = size;
    }

    public String getMargin () {
        return margin;
    }

    public void setMargin (String margin) {
        this.margin = margin;
    }

    public String getPadding () {
        return padding;
    }

    public void setPadding (String padding) {
        this.padding = padding;
    }

    public void addFont (PDFFont font) {
        fonts.add (font);
    }

    public List<PDFFont> getFonts () {
        return fonts;
    }

    public void addMetaElement (DocumentMetaElement meta) {
        elements.put (meta.getPosition (), meta);
    }

    public Map<MetaElementPosition, DocumentMetaElement> getMetaElements () {
        return elements;
    }
}